package com.wy.w_ui.banner.scroller;

import android.content.Context;
import android.widget.Scroller;

/**
 * 控制滚动速度
 */
public class WBannerScroller extends Scroller {

    /**
     * 值越大,滑动越慢
     */
    private int duration = 1000;
    public WBannerScroller(Context context,int duration) {
        super(context);
        this.duration = duration;
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy) {
        super.startScroll(startX, startY, dx, dy,this.duration);
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy, int duration) {
        super.startScroll(startX, startY, dx, dy, this.duration);
    }
}
